Skip to content

Get all entries and profile data of an eksisozluk.com user as JSON or UNIX env format.

License

Notifications You must be signed in to change notification settings

rojenzaman/eksi2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eksi2json

Get all entries and profile data of an eksisozluk.com user as JSON or UNIX env format.

Usage

First install the dependencies:

npm install

and run:

node eksi2json.js "username"

User data will be saved to the username.json file.

JSON Object Structure

{
  "entries": [
    {
      "title": "",
      "entry": "",
      "date": "",
      "link": ""
    }
  ],
  "profile": [
    {
      "quote": "",
      "quote_title": "",
      "quote_date": "",
      "quote_link": "",
      "badges": "",
      "count": ""
    }
  ]
}

Convert JSON data to UNIX environment file

json2env.sh username.json

and use it:

. ${epoch}.ENV
for (( i = 0; i < ENTRY_COUNT; i++ )); do
cat <<EOT
${title[$i]}
${url_slug[$i]}
$(echo "${entry[$i]}" | base64 -d)
${link[i]}
${date_format[$i]}
$AUTHOR_SLUG
$AUTHOR


EOT
done

UNIX ENV Structure:

#META
AUTHOR=""
AUTHOR_SLUG=             
ENTRY_COUNT=  
DATE=          
QUOTE=""
QUOTE_TITLE=""
QUOTE_DATE=""
QUOTE_DATE_FORMAT=                    
QUOTE_LINK=""
BADGES=""
#EOF META

title[i]=""
url_slug[i]=""
date[i]=""
date_format[i]=                    
link[i]=""
entry[i]=""

START_DATE=                    
#EOF FILE

Convert other formats:

TODO

  • Get twitter user name.
  • Get user uploaded images as link.
  • Get title of "el emeği göz nuru" entries.