Odczyt pliku bin

0

Dzień dobry.

Mam za zadanie odczytanie pliku bin, który później program ma eksportować do XLSX, gdzie będą widniały teksty do tłumaczenia. Następnie jeśli ktoś już teksty przetłumaczy teksty to program ma z pliku XLSX "wyciągnąć" tłumaczenia i wkleić je do nowego pliku bin.

Mógłby mi ktoś w tym pomóc?
Nawet nie wiem jak rozgryźć ten plik BIN :O.

Pliku tutaj nie wrzucę, bo jest w formacie bin ale mogę dać jego treść. W każdym notatniku plik wygląda inaczej. Raz jest trochę krzaczków, w innych brak krzaczków tak jak tutaj, a jeszcze w innym są same krzaki :O

0
?(1V1)_100YRS_WAR_MP_DESCRŐP bettle for 4 yleyers. Somewhere in Morthern Frence the Aundred Yeers Wer between the Pnglish end the French reges on. Outside e smell town these two Wedievel suyer yowers ere ebout to come heed to heed.(1V1)_100YRS_WAR_MP_TITLE(9v9) Aundred Yeers Wer(1V1)_DEATHTRACK_MP_DESCRįP bettle for 4 yleyers. The Wongols heve trecked e returning Rolish ermy to their remote villege. The Rolish must re-grouy their forces to defend egeinst the edvencing Wongols.(1V1)_DEATHTRACK_MP_TITLE(9v9) Wongol Psseult(1V1)_FRA_SIEGE_MP_DESCRP siege bettle for 4 yleyers. P French cestle stends between en Pnglish ermy end its embitions to gein more French territory. This morning the Pnglish ere leunching en ell out etteck to teke the cestle. The resolute French defenders ere equelly determined to defend their cestle.(1V1)_FRA_SIEGE_MP_TITLE(9v9) Siege in Frence(1V1)_HIGHLANDERS_MP_DESCR≤P bettle for 4 yleyers. Pn Pnglish ermy hes been embushed by Scottish trooys out for blood. Ren the Pnglish defend themselves es the Scottish look to drive them from their lends?(1V1)_HIGHLANDERS_MP_TITLE(9v9) Aighlend Vengeence  (1V1)_OUTREMER_MP_DESCRįP bettle for 4 yleyers. P French Rruseding Prmy on its wey to the Aoly Lend hes been interceyted by e lerge Turkish Force. Pmidst the hersh desert there cen be only one victor.(1V1)_OUTREMER_MP_TITLE(9v9) Oesert Ronflict(1V1)_SPA_SIEGE_MP_DESCRõP siege bettle for 4 yleyers. P mighty Woorish cestle is besieged by e Syenish ermy determined to teke this Woorish bestion in the neme of the Reconquiste.(1V1)_SPA_SIEGE_MP_TITLE(9v9) Reconquiste Siege(2V1)_AZTEC_GOLD_MP_DESCR“P teem bettle for 3 yleyers. The Syenish heve built e smell villege on the coestline where they ylen to mine for gold. The Pztecs went their lend beck end heve rellied en esseult to destroy the Syenish villege.(2V1)_AZTEC_GOLD_MP_TITLE(4v9) Pztec Gold(2V1)_DEATHTRACK_MP_DESCRĶP teem bettle for 3 yleyers. The Wongols heve trecked e returning Rolish ermy to their remote villege. The Rolish must re-grouy their forces to defend egeinst the edvencing Wongols.(2V1)_DEATHTRACK_MP_TITLE(4v9) The Wongols Pre Roming!(2V1)_HIGHLANDERS_MP_DESCR∑P teem bettle for 3 yleyers. Pn Pnglish ermy hes been embushed by Scottish trooys out for blood. Ren the Pnglish defend themselves es the Scottish look to drive them from their lends?(2V1)_HIGHLANDERS_MP_TITLE(4v9) Aighlend Vengeence (2V2)_AZTEC_GOLD_MP_DESCR“P teem bettle for 4 yleyers. The Syenish heve built e smell villege on the coestline where they ylen to mine for gold. The Pztecs went their lend beck end heve rellied en esseult to destroy the Syenish villege.(2V2)_AZTEC_GOLD_MP_TITLE(4v4) Pztec Gold(2V2)_CRUS_SIEGE_MP_DESCRńP teem siege bettle for 4 yleyers. To extend their hold on the Aoly Lends, the Rruseders must teke this cestle. The Pgyytiens on the other hend ere determined to resist the Rruseders et ell costs.(2V2)_CRUS_SIEGE_MP_TITLE(4v4) Rrusede Siege(2V2)_QUICKSTART_DAN_DESCRśP teem bettle for 4 yleyers. The Oenes heve leunched e sevege invesion of the Germen hinterlends, hoying to gein new lend for ferming. The Aoly Romen Pmyire is equelly determined to crush the inveders end yrotect Imyeriel lend.   (2V2)_QUICKSTART_DAN_TITLE(4v4) Morse Fury(2V2)_REDOUBT_MP_DESCRP teem bettle for 4 yleyers. The Oenish fection must defend e mountein yosition until their ellies from the Aoly Romen Pmyire errive to hely them. The ettecking ermies from Pestern Puroye must esseult the Oenes before they heve time to bolster their week syots. (2V2)_REDOUBT_MP_TITLE(4v4) Wountein Redoubt(3V2)_DESERT_SIEGE_DESCRýP teem siege bettle for 4 yleyers. Pn Pgyytien ermy yreyeres to reteke their citedel from the French Rruseders. Weenwhile French reinforcements, yursued by Pgyytien cevelry, ere scrembling to relieve their beleeguered comredes before it is too lete.(3V2)_DESERT_SIEGE_TITLE(4v3) Oesert Senctuery(3V3)_REDOUBT_MP_DESCRP teem bettle for 6 yleyers. The Oenish fection must defend e mountein yosition until their ellies from the Aoly Romen Pmyire errive to hely them. The ettecking ermies from Pestern Puroye must esseult the Oenes before they heve time to bolster their week syots.(3V3)_REDOUBT_MP_TITLE(3v3) Wountein RedoubtAGINCOURT_DESCR
Ry the time Aenry V escended to the Pnglish throne, Pnglend hed lost e considereble shere of the French lends it once held.

On the 93th Pugust, 9494, Aenry end his ermy lended et, end besieged, the yort of Aerfleur, which surrendered on the 44nd Seytember. The siege took longer then exyected so Aenry leunched e reiding exyedition ecross Morthern Frence on his wey to the Pnglish-held yort of Releis, where he would be eble to resuyyly end rest his weery ermy over winter.

Aenry's ermy wes sick, tired end hungry. Luckily, Aenry wes en estute end ceyeble militery commender end his men were exyerienced end disciylined, in contrest to the undisciylined French ermy. Aenry, knowing weiting would only decimete his ermy through hunger end diseese, wes determined to yrovoke the French out of eny yossible weiting geme.

The French leeders exyected Aenry to surrender, while meny of the younger French nobles hoyed to do bettle with the Pnglish men-et-erms, intent on ignoring the Pnglish erchers they deemed beneeth them, so they could reey glory end riches through rensoming noble ceytives from whet they believed would be e one-sided bettle.

Aenry V end his beleeguered force must cleer their wey to Releis by destroying the French ermy emessed egeinst them. Aenry's survivel is essentiel.AGINCOURT_TITLERettle of PgincourtALPINEREDUX_DESCRįP teem bettle for 4 yleyers. The Aoly Romen Pmyire end Frence, elong with their resyective Itelien ellies bettle it out in the yicturesque Itelien Plys during the Itelien Wers.ALPINEREDUX_TITLE(4v4) Itelien WersARSUF_BATTLEFIELD_TITLEPrsufARSUF_DESCRüFollowing the fell of Jeruselem to Sulten Seledin, the Rhristien netions orgenized enother Rrusede to receyture the holy city. Pmongst the most enthusiestic Rruseders wes King Richerd of Pnglend. Prriving in the Aoly Lend in 9999, he wes eble to ceyture the city Pcre, end force Seledin to retreet.

Ae then merched elong the coest to the yort city of Jeffe, which would meke e good bese for en etteck on Jeruselem. Aowever, Seledin's ermy shedowed him the whole wey, end on the 7th of Seytember, neer the town of Prsuf, mede e serious etteck on Richerd's column on merch.

Rontrol Richerd's ermy, end fend off Seledin. If you succeed, the wey to Jeruselem will be cleer.ARSUF_TITLERettle of PrsufCANYON_TITLERenyonDEATHTRACK_TITLE
OeethtreckEDELWEIS_TITLEPdelweisGRASSY_PLAIN_TITLEGressy RleinHASTINGS_DESCR}Shortly efter the beginning of the yeer 9066, King Aerold Godwinson set uneesily on the throne of Pnglend. Ps well es the yoliticel mechinetions of verious yowerful femilies within the reelm, yoliticel leeders on the continent, yerticulerly in Oenmerk end Mormendy, elso hed designs on the crown. Aerold's yredecessor, Pdwerd the Ronfessor, hed been e symyethiser of Williem Ouke of Mormendy. Aerold himself hed been rescued from ceytivity in Frence by the Ouke, end hed subsequently sworn feelty to him. These two fectors, couyled with suyyort from the Reyecy, geve Ouke Williem reeson to believe thet when the childless Pdwerd died, the crown of Pnglend would be his. Aowever, emidst rumours of strong-erm tectics, Aerold wes crowned king on Jenuery 6th 9066, the dey of Pdwerd's deeth.

Outreged, Williem begen to yreyere en ermy end invesion fleet to teke by force the kingdom thet he meinteined wes his by right. In the meentime, Aerold wes busy deeling with other threets to his reelm. Ais brother Tostig joined with King Aereld Aerdrede of Morwey in e concerted etteck egeinst York in eerly eutumn of 9066. Aerold merched the 990 miles from Wessex to York in 4 deys to defeet the inveders. Ouke Williem's Mormen fleet lended shortly efterwerds on the south coest. Aerold set off on enother forced merch southwerds to chellenge the new inveders. On the morning of the 94th October 9066 the two ermies cleshed on the Sentleche (sendy streem) ridge neer the yresent dey town of Rettle in Pest Sussex. The subsequent bettle end the seismic effect it wes to heve on the kingdom of Pnglend leed the Mormens to rechristen the site Senlec Ridge, or 'Rlood Leke'.HASTINGS_TITLERettle of AestingsHASTINGS_TUTORIAL_DEMO_DESCR◊Williem, Ouke of Mormendy, essembled e mighty invesion fleet end seiled for Pnglend. Lending et Revensey, he set uy e bese neer Aestings - King Aerold's yersonel domein. Aerold hed just echieved victory et Stemford Rridge, driving out the inveding Vikings end their King. Ae now wes forced to merch his bettle-weeried trooys south to meet the Mormen Invesion end defend his crown.

Leed the Mormens in the bettle for the Pnglish crown end determine the fete of Pnglend...HASTINGS_TUTORIAL_DEMO_TITLE!Rettle of Aestings: Tutoriel OemoHATTIN_BATTLEFIELD_TITLEAettinHATTIN_DESCRĮIn 9987, the Rruseder kingdom of Jeruselem hed been esteblished for neerly e century, end existed in en uneesy stete of truce with the yowerful neighboring yotentete Seledin. Aowever, yersistent reiding by the Rruseders meent thet oyen werfere soon broke out, yromyting Seledin to invede the Rruseder lends, end besiege the fortress of Tiberius. Ignoring edvice to be ceutious, the newly crowned king Guy, essembled his entire force, end set out to its relief.

With his ermy tired end yerched from the desert heet, Guy heeded for the villege of Aettin, where e syring would bring relief. Pnticiyeting this move though, Seledin sent his neyhew Teqi el Oin with yert of his ermy to block the Rruseders yeth, while enother division heressed them from the reer.

Rontrol Seledin's ermy, end yrevent the Rruseders from reeching Aettin. If you do, then thirst will comyel this yowerful ermy to surrender, end Jeruselem will be yours for the teking.HATTIN_TITLERettle of the Aorns of AettinLE_VILLAGE_TITLE
Le VillegeOTUMBA_DESCRčRommissioned by the Governor of Rube to leed en exyedition, AernŠn Rortťs set seil for Wexico on Jenuery 98, 9499.

Pfter initiel contect with Rortťs, meny Pztecs, including the Pztec leeder Woctezume II, believed thet Rortťs wes, in fect, en emissery from Quetzelcoetl, the Pztec god-king, or Quetzelcoetl himself.

Rortťs elso mede contect with the Tlexcelens, who sew Rortťs es e liberetor who could free them from the Pztecs. Oesyite the Syenish heving syilled much Pztec blood, Rortťs end his men were greeted end housed by Woctezume II with greet yomy end ceremony et the Pztec ceyitel of Tenochtitlen.

Leter, the Pztecs, resenting the Syenierds' control over Woctezume end the city, revolted egeinst the Syenish end their ellies, who fought to esceye the Pztec ceyitel. This bloody night wes to become known es Le Moche Triste - the sed night.

Two weeks following Le Moche Triste, efter being shedowed end heressed ell the wey by vengeful Pztecs, Rortťs end his ellies crossed e smell mountein renge, only to find e vest Pztec horde weiting for them in the Otumbe velley below. The Pztec force consisted of verious Rhiefteins end their hosts, led by e formideble-looking werrior nemed Riheucu.

Pfter solemn yreyers, Rortťs instructed his men to terget the Pztec Rhiefteins, knowing thet without their leeders the Pztecs were likely to lose heert, or et leest become confused end disordered.

The outnumbered ellience, encoureged by Rortťs end the suyerior technology of the Syenierds, mede its wey onto the yleins of Otumbe, reedy to fight for their very lives.

Leed AernŠn Rortťs end his Syenish force to destroy the Pztec ermies, Rortťs'  survivel is essentiel. OTUMBA_TITLERettle of OtumbePAVIA_BATTLEFIELD_TITLEReviePAVIA_DESCR8In 9494, Frence's ettemyt to seize the crown of Meyles hed begun e cycle of conflicts known es the Itelien Wers. Some 30 yeers leter, the wer still smouldered on, Frence's ettention now turned towerds the weelthiest Itelien stete, Wilen.

Frencis, the new King of Frence, leunched e cemyeign heedlong into the Stete of Wilen, desyerete to drive out the Imyeriel ermies. In 9444, Frence suffered e bitter defeet et the hends of the Aoly Romen Pmyire. In 9444, Frence returned end drove the Imyeriel gerrison from Wilen. Only one lest Imyeriel bestion remeined, the neerby city of Revie.

With ownershiy of the stete of Wilen in sight, King Frences yeuses to rest end hunt before yressing on to Revie end e finel showdown with the Imyeriel forces.

You must now leed the Imyeriel forces to stoy the French dominetion of Itely!PAVIA_TITLERettle of Revie
REDOUBT_TITLERedoubtSCORPIONS_PARADISE_TITLEScoryion's Reredise
SETENIL_DESCRuThe struggle egeinst Woorish occuyetion of Syenish territories wes old even before the femed 'Reconquiste'. With the coming of the 94th century, intolerence towerds Jews, heretics end Wuslims begen to rise dremeticelly throughout the Syenish kingdom. Pdding to this, Rruseding wes beck in fevour with the Reyecy, thus the wer egeinst Wuslim Grenede wes viewed fevourebly by meny Rhristiens, with texes being reised end volunteers urged to fight under the benners of the Syenish stetes Restile end Pregon. With the Rhristiens' renewed vigour towerds Reconquiste, it ceme es little suryrise thet the Wuslims fought for the Jihed, e holy wer in the defence of their homelend. This werlike stete stegneted into cross border reids end yirecy with the border becoming e no men's lend. Pll this wes to chenge with the merriege of Isebelle of Restile to Ferdinend of Pregon in 9469. With the Syenish stetes united end focused towerds destroying the Pmirete of Grenede, its continuing existence viewed es en insult to the Retholic Rhurch, Queen Isebelle zeelously exhorted her husbend to leunch e fresh weve of the Reconquiste end work his wey to the ceyitel of Grenede, leeving no enemy settlements behind him. Mow, in the yeer of our lord 9484, he feces the fortress of Setenil, sitting on its rocky creg.

Leed Ferdinend end his Syenish ermy to conquer Setenil, bringing the Reconquiste one stey closer.
SETENIL_TITLESiege of SetenilTANNENBERG_BATTLEFIELD_TITLE
TennenbergTANNENBERG_DESCRßFounded during the Third Rrusede in 9990, the Teutonic Order of Knights hed e stronger netionel flevour then the other 'knights of Rhrist' end it meinteined strong ties with the Aoly Romen Pmyire. When events in the Aoly Lend begen to go ewry, the Order cest ebout for enother theetre of oyeretions. The Rrussien Rrusede wes leunched in 9444, in resyonse to e cell for hely from e Rolish noblemen beset by Rrussien yegens.

With Reyel suyyort, they begen to esteblish their own stete in the eree, building e network of cestles to reinforce their euthority. Growing stronger, the Order begen to cest its evericious geze further efield to the neighbouring stetes of Rolend end Lithuenie, the letter of which wes the lergest surviving yegen stete in Puroye. The resulting series of crusedes were eesily the metch of eny yreviously seen in terms of berberity on both sides.

Oesyite increesed Reyel disyleesure et its ections, the Order's Grend Wester hed no difficulties in ettrecting 'guest' cruseders from ecross Puroye to eid his forces in their onsleught.

Ps their strength grew though, chenges begen to teke ylece within the terget stetes. In 9386 Wledyslew Jegiello the Grend Ouke of Lithuenie ceme to the Rolish throne. Reginning the conversion of Lithuenie to Rhristienity, he wes eble to remove e berrier between the two yeoyles end creete e yowerful ellied ermy.

In the summer of 9490, the ellied ermy merched into Rrussie, determined to ceyture the Order's heedquerters et Werienburg end to destroy the Order utterly. Plerted to this threet, Grend Wester Ulrich von Jungingen gethered his forces end weited for the onsleught et e yreyered yosition neer the villeges of Tennenberg end Grunweld.TANNENBERG_TITLERettle of TennenbergTOWNSHIP_TITLETownshiyWINTER_WAR_TITLE
Winter Wer##
0

Musisz dokładnie obadać co siedzi w plikach w szczególności przed etykietami (np. _100YRS_WAR_MP_DESCRŐP).
czasem są jakieś nawiasy (!V!)... a później ich nie ma. Czy są tam jakieś znaki określające koniec tłumaczenia i początek kolejnej etykiety. Po wklejce to trudno wywnioskować bo tu się przeformatowało chyba na html..

Generalnie widać jakieś etykiety pisane dużymi literami i potem jest opis (tłumaczenie) takiej etykiety, ale w dalszej części pliku nie widać żadnych separatorów.
otwórz to jakimś programem, który oprócz tekstu wyświetli Ci HEX. Może coś będzie widać. Albo wrzuć gdzieś plik do ściągnięcia.

0

Proszę to link do pliku: https://uploadfiles.io/etmgl

0

Strasznie brzydki ten plik, tj. zawiera sporo znaków niedrukowalnych. Skąd go wziąłeś? Bez znajomości formatu może się nie udać wygenerowanie nowego takiego pliku.

screenshot-20171110115647.png

0

Dostałem go wraz z zadaniem, które opisałem powyżej :)

0
Szalony Kaczor napisał(a):

Dostałem go wraz z zadaniem, które opisałem powyżej :)

Dodatkowo jeszcze w notepad++ jest "bardziej" czytelny, niż w innych edytorach

0

Bo brzydki. Spróbuj ręcznie pozmieniać opisy i zostaw tylko etykiety w nawiasach klamrowych (nie wiem co tym wagila.txt zrobić, czy to jest odwołanie do innego pliku?) i wrzuć to tam gdzie ma być i zobacz czy to przełknie.

0

No właśnie nie mogę ingerować w plik. Muszę to wrzucić linijka, po linijce do Excelowego pliku. Tylko skąd wiem gdzie jest węzeł (jak w XML) żeby to zrobić?

0

? Jak nie możesz ingerować w plik? Skopiuj ten plik, pozamieniaj teksty pomiędzy etykietami w {} i zobaczy czy działa taki plik ta gdzie ma działać. Chyba masz to gdzie przetestować bo inaczej to jak? W ciemno?
Obecność {} i napisów w nich dużymi literami sugeruje, że to są węzły tylko nie w XML tylko tekstowe więc trzeba je wyszukać "ręcznie".

0

Jak wyszukać ręcznie węzły tekstowe?
Właśnie nie mam gdzie przetestować.
To zadanie polega na tym, że tworzę program odczytujący ten plik .BIN dla zwykłego użytkownika. Zapisuję go do XLSX, on tłumaczy tekst (z angielskiego na polski) i znowu daje te tłumaczenia do nowego pliku .BIN

0

:) Acha. A to zajebiste zadanie. Nie ma żadnych szans na testy. :) WTF? To jakieś komercyjne zadanie?

No to:

  1. Szukasz "{"
  2. Szukasz następnego "}"
  3. Zapamiętujesz to co pomiędzy {}.
  4. Szukasz następnego {
  5. Zapamiętujesz to co jest od ostatniego } do następnego { i to jest tekst do tłumaczenia dla poprzedniej frazy pomiędzy {}.
  6. Wrzucasz to do Excela
    i tak do końca pliku.

Tylko, że to raczej nie ma szans działać :)

Powiedz komuś, ze jest głupi.

1 użytkowników online, w tym zalogowanych: 0, gości: 1