New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

'Wikipedia' Tab: Adding Multiple Links at a Time

General discussion

'Wikipedia' Tab: Adding Multiple Links at a Time

Postby Gobaith » Tue Jul 31, 2012 2:07 pm

Hi,

Could someone please tell me if it's possible to somehow add a dozen or so links to the 'Wikipedia' Tab without typing them in one at a time. I mean, maybe there is a way to edit the <mediawikis> section of the 'config' file directly? Also, how do you sort entries on this tab?

Thanks in advance.
Gobaith
 
Posts: 13
Joined: Mon Jul 09, 2012 10:39 pm

Re: 'Wikipedia' Tab: Adding Multiple Links at a Time

Postby chulai » Tue Jul 31, 2012 2:59 pm

I have added them manually from inside GoldenDict. My config file has:

Code: Select all
<mediawikis>
  <mediawiki enabled="1" url="http://en.wikipedia.org/w" id="ae6f89aac7151829681b85f035d54e48" name="English Wikipedia"/>
  <mediawiki enabled="1" url="http://en.wiktionary.org/w" id="affcf9678e7bfe701c9b071f97eccba3" name="English Wiktionary"/>
  <mediawiki enabled="1" url="http://ru.wikipedia.org/w" id="8e0c1c2b6821dab8bdba8eb869ca7176" name="Russian Wikipedia"/>
  <mediawiki enabled="1" url="http://ru.wiktionary.org/w" id="b09947600ae3902654f8ad4567ae8567" name="Russian Wiktionary"/>
  <mediawiki enabled="1" url="http://de.wikipedia.org/w" id="a8a66331a1242ca2aeb0b4aed361c41d" name="German Wikipedia"/>
  <mediawiki enabled="1" url="http://de.wiktionary.org/w" id="21c64bca5ec10ba17ff19f3066bc962a" name="German Wiktionary"/>
  <mediawiki enabled="1" url="http://pt.wikipedia.org/w" id="96957cb2ad73a20c7a1d561fc83c253a" name="Portuguese Wikipedia"/>
  <mediawiki enabled="1" url="http://pt.wiktionary.org/w" id="ed4c3929196afdd93cc08b9a903aad6a" name="Portuguese Wiktionary"/>
  <mediawiki enabled="1" url="http://es.wikipedia.org/w" id="37d4fb0e7e1fed817a7bb4d7f5070831" name="Spanish Wikipedia"/>
  <mediawiki enabled="1" url="http://es.wiktionary.org/w" id="32a686a72b93a4a3fb1e3ea036eb7297" name="Spanish Wiktionary"/>
  <mediawiki enabled="1" url="http://it.wikipedia.org/w" id="8ac51edf30f8b72cca7a72c4f050608a" name="Italian Wikipedia"/>
  <mediawiki enabled="1" url="http://it.wiktionary.org/w" id="16bffc1e94554a8ef3a6c3c78cd08e0b" name="Italian Wiktionary"/>
  <mediawiki enabled="1" url="http://fr.wikipedia.org/w" id="ac9d46495198cff552fac088a2b47b87" name="French Wikipedia"/>
  <mediawiki enabled="1" url="http://fr.wiktionary.org/w" id="b7effdba13278b2e3c3945760960b4f1" name="French Wiktionary"/>
  <mediawiki enabled="1" url="http://ja.wikipedia.org/w" id="a131902566e83ac6a8bef11df50b8fc3" name="Japanese Wikipedia"/>
  <mediawiki enabled="1" url="http://ja.wiktionary.org/w" id="9adf955b882a6304d70c4670d09f1449" name="Japanese Wiktionary"/>
  <mediawiki enabled="1" url="http://zh.wikipedia.org/w" id="592ea034b535a2b7502da4e1614500e8" name="Chinese Wikipedia"/>
  <mediawiki enabled="1" url="http://zh.wiktionary.org/w" id="b1b17741e57d944db453ac7fe2f880c7" name="Chinese Wiktionary"/>
  <mediawiki enabled="1" url="http://la.wikipedia.org/w" id="0fdb61e3abca194635319e8766ca7937" name="Latin Wikipedia"/>
  <mediawiki enabled="1" url="http://la.wiktionary.org/w" id="de1cbb4bb6c5f3b2910dbe0155b8888a" name="Latin Wiktionary"/>
  <mediawiki enabled="1" url="http://en.citizendium.org" id="9576a7c5d344a79417cd53cf99d715d5" name="Citizendium"/>
 </mediawikis>
...
 <group icon="us.png" id="10" name="en">
   ...
   <dictionary name="English Wikipedia">ae6f89aac7151829681b85f035d54e48</dictionary>
   <dictionary name="English Wiktionary">affcf9678e7bfe701c9b071f97eccba3</dictionary>
   ...
 </group>



The potential issue I see is that they get a dictionary Id assigned. Not sure if you can make those up. Try and let us know.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: 'Wikipedia' Tab: Adding Multiple Links at a Time

Postby Gobaith » Tue Jul 31, 2012 5:40 pm

The id field is exactly why I was asking for help.

But it seems that GD is quite happy with any unique 32 character alphanumeric string as a dictionary identifier. I added half a dozen Wiki's just to see what would happen, and everything's working just fine.
Gobaith
 
Posts: 13
Joined: Mon Jul 09, 2012 10:39 pm

Re: 'Wikipedia' Tab: Adding Multiple Links at a Time

Postby Clbyuely » Wed Aug 01, 2012 2:16 am

what's the exact meaning which shows in the field of "id=".
That's the only thing I can't get understood.
Clbyuely
 
Posts: 1
Joined: Wed Aug 01, 2012 2:09 am
Location: New York

Re: 'Wikipedia' Tab: Adding Multiple Links at a Time

Postby chulai » Fri Aug 17, 2012 11:09 am

Clbyuely wrote:what's the exact meaning which shows in the field of "id=".
That's the only thing I can't get understood.


According to the source code documentation:
Code: Select all
Id is based on the set of file names which the dictionary consists of. The resulting id is an alphanumeric hex value made by hashing the file names. This id should be used to identify dictionary and for the index file name, if one is needed.


That's why If you move your dictionary files to a new location the ids change and with that the index files, and GoldenDict has to reindex everything again. I think for portable version uses relative file paths instead of absolute ones so you might be able to move the entire GoldenDict folder from one hard drive to another with no need to reindex. But I'm not sure...
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm


Return to General

Who is online

Users browsing this forum: No registered users and 41 guests

cron