If you get an invalid CSRF error, its generally best to just get a new
token and try again.

> 2. Once successfully uploaded audio not reflected to UN-Audio words API
   <
https://ta.wiktionary.org/w/api.php?action=query&format=json&list=categorymembers&utf8=1&cmtitle=%E0%AE%AA%E0%AE%95%E0%AF%81%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81:%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D-%E0%AE%92%E0%AE%B2%E0%AE%BF%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AF%8B%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%95%E0%AE%B3%E0%AE%BF%E0%AE%B2%E0%AF%8D%E0%AE%B2%E0%AF%88&cmlimit=50&cmsort=timestamp&cmdir=desc
>
and
   Word’s Wiktionary page.


Hmm, as far as I can tell, MediaWiki does not seem to be recording the
{{#ifexist:Media:ta-{{PAGENAME}}.ogg|...  as an image link. But it should.
I don't understand why it is not (For reference, the page i was looking at
was
https://ta.wiktionary.org/wiki/%E0%AE%85%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%BF%E0%AE%A9%E0%AE%BF%E0%AE%AE%E0%AF%81%E0%AE%95%E0%AE%9A%E0%AF%8D%E0%AE%9A%E0%AF%82%E0%AE%B0%E0%AE%A3%E0%AE%AE%E0%AF%8D
. Consider
https://ta.wiktionary.org/w/api.php?action=parse&page=%E0%AE%85%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%BF%E0%AE%A9%E0%AE%BF%E0%AE%AE%E0%AF%81%E0%AE%95%E0%AE%9A%E0%AF%8D%E0%AE%9A%E0%AF%82%E0%AE%B0%E0%AE%A3%E0%AE%AE%E0%AF%8D&formatversion=2&prop=images
. The ogg file should be recorded as a link there due to the template
வார்ப்புரு:ஒலிக்கோப்பு-தமிழ்  ). Anyways, filed
https://phabricator.wikimedia.org/T245965 about it because this is a
mistake on our end. This means mediawiki will not automatically change the
categories on file upload.

As a workaround, I would suggest after upload you do
https://ta.wiktionary.org/w/api.php?action=purge&forcelinksupdate=true&titles=PageUsingTheFile
. That is, do a forcelinksupdate purge on the page that uses the ogg file
that was uploaded.

> Empty append text in edit action is good or bad?

That's called a null edit. Its more or less the same as as using
?action=purge&forcelinksupdate=true from the api.

> Client login or OAuth login - Which one is better?

If you're operating a website, than oauth (including oauth 1) is the clear
better option. If you have an app that lives on the client's machine, then
the new oAuth 2 is a possibility. OAuth 2 is probably better, but its still
really new, and clientlogin is fine too imo.

> In Which license to release uploaded audio file? Public domain or CC
   by zero or any ? and reason?

You need to ensure you get the consent of your users for whatever option
you use. CC-0 gives away all rights to the file, which does make it very
easy to reuse. This is more a political question, you may want to ask on
commons or tawiktionary as to what is preferred.

--
Brian


On Sun, Feb 23, 2020 at 6:02 AM Manimaran_K <manimaraninam1...@gmail.com>
wrote:

> Hi all,
>
> I am Manimaran(https://manimaran96.WordPress.com), Free Software Activist
> and Android Developer. I developing the app called Spell4Wiki.
>
> *Spell4Wiki - Spell For Wiki*
>
> Spell4Wiki is an mobile application to record and upload audio to wiki
> commons for Wiktionary words.Spell4Wiki also act as dictionary. Words
> meanings are come from Wiktionary.
>
>
> *Useful Links*
>
> Source code : https://github.com/manimaran96/Spell4Wiki
>
> APK :
>
> https://github.com/manimaran96/Spell4Wiki/releases/download/devapp_v5/spell4wiki_v5.apk
>
> Workflow :
> https://manimaran96.files.wordpress.com/2020/02/spell4wiki_workflow-1.png
>
> Blog :
>
>
> https://manimaran96.wordpress.com/2019/01/06/spell4wiki-mobile-app-to-record-upload-audio-for-wiktionary/
> <
> https://manimaran96.wordpress.com/2020/02/21/spell4wiki-mobile-app-to-record-upload-audio-to-wiki-commons-for-wiktionary-words-part-2/
> >
>
>
> https://manimaran96.wordpress.com/2020/02/21/spell4wiki-mobile-app-to-record-upload-audio-to-wiki-commons-for-wiktionary-words-part-2/
>
>
> While developing I struggled in some places(listed below). If anyone have
> idea about this please help me...
>
> *Problems*
>
>    1. While uploading audio some times I got a message “Invalid CSRF”.
>    2. Once successfully uploaded audio not reflected to UN-Audio words API
>    <
> https://ta.wiktionary.org/w/api.php?action=query&format=json&list=categorymembers&utf8=1&cmtitle=%E0%AE%AA%E0%AE%95%E0%AF%81%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81:%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D-%E0%AE%92%E0%AE%B2%E0%AE%BF%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AF%8B%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%95%E0%AE%B3%E0%AE%BF%E0%AE%B2%E0%AF%8D%E0%AE%B2%E0%AF%88&cmlimit=50&cmsort=timestamp&cmdir=desc
> >
> and
>    Word’s Wiktionary page.
>
> Problem : 1Reason I found
>
>    1. I think this comes may be session time out or expire or wrong CSRF
>    token.
>    2. Once app close session expired
>
> What I tried
>
>    1. I am saving first CSRF token after login. Then after every edit
>    request use same CSRF token -> Not worked.
>    2. Every time getting new CSRF token for every edit request -> Not
>    worked.
>    3. I managed the cookies using android-lib
>    <https://github.com/franmontiel/PersistentCookieJar> -> Not worked.
>
> Questions
>
>    1. How to solve this?
>    2. Possible to extend login expire time?
>    3. Which header/cookie is important for every edit request?
>
> Problem : 2
>
> Reason I found
>
>    1. I think Wikipedia refresh the UN-Audio word list and Wiktionary word
>    page after specific period of time.
>
> What I tried
>
>    1. Once user uploaded audio of particular word. Then that word stored in
>    local DB and not showing next time to user -> Not suit for global use.
>    2. After audio upload edit(Just append text “” empty) the particular
>    word’s page in Wiktionary
>       1. This time updated in Wiktionary page suddenly but Un-Audio API
>       some times only reflected.
>       2. Sometime IP blocked due to this type of empty edit.
>
> Questions
>
>    1. How to solve this?
>    2. Empty append text in edit action is good or bad?
>    3. While uploading audio to commons How to manage conflict works or
>    duplicate works? Because lot of user may contribute same word.
>
> Some General Doubts
>
>    1. Client login or OAuth login - Which one is better?
>    2. In Which license to release uploaded audio file? Public domain or CC
>    by zero or any ? and reason?
>
> I hope i explained my needs clearly. If you have any doubts/questions ask
> me.
>
> I expect collective answers from who are able to help me, at least convey
> whatever you know. Which is help to further develop.
>
>
> Thanks in advance.
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to