{"id":13554416,"url":"https://github.com/padagraph/botapadd","last_synced_at":"2025-04-03T06:31:46.567Z","repository":{"id":90032084,"uuid":"82104397","full_name":"padagraph/botapadd","owner":"padagraph","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-12T16:53:16.000Z","size":3006,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-04T02:32:53.427Z","etag":null,"topics":["csv","graph","visualization"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/padagraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-15T20:41:51.000Z","updated_at":"2019-06-15T00:50:42.000Z","dependencies_parsed_at":"2024-01-22T08:05:42.148Z","dependency_job_id":null,"html_url":"https://github.com/padagraph/botapadd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padagraph%2Fbotapadd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padagraph%2Fbotapadd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padagraph%2Fbotapadd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padagraph%2Fbotapadd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/padagraph","download_url":"https://codeload.github.com/padagraph/botapadd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246948103,"owners_count":20859379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","graph","visualization"],"created_at":"2024-08-01T12:02:47.442Z","updated_at":"2025-04-03T06:31:45.442Z","avatar_url":"https://github.com/padagraph.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"    \n## Installation\n\n    $ make install build\n\n## Run for testing/developpment\n\n    # this will launch a flask application listening on http://localhost:5000\n    $ make rundev\n\n\n# botapad\n\nImport data in padagraph.io\n\n    * command line\n    * flask app\n\n# Command Line\n\n* import from file or URL\n* csv like import format\n\n## Format\n\nWe are using a csv like file format for data.  \nOne header is required to describe the content of the data.  \nSome special characters are used at a begin line:  \n\n*[Comments]*  \n* '!' is used to comment a line, usefull for discussion and help, it will be ignored by the program\n\n*[Separator]*  \n* is defined in the first line \"!,\" a commented comma  can also use \"!;\"\n\n*[Headers]*  \n* '@' Header for nodes :  \n* '_' Header for edges :  \n\n*[Properties]*  \n* '*' marker for starred nodes :  \n* '+' marker for multiple values in column  \n\n* '%' marker for projection :  \n* '\u003e' and '\u003c' edge direction , [optional] default '\u003c'\n* '=' used with '%' create a clique with all cell elements :  \n* '(w)' w: float value used as edge weight\n* '[v]' v: text value used as default value for a property\n\n* '\u0026' is an import directive to load external data  \n\n\n`Headers` refers to `nodetypes` or `edgetypes` in the padagraph database.   \nsyntax is ```char name: prop; other``` with `char` in ( `@`,`_` )   \n`:` after  Nodetype name and `;` between properties  \nProperties are defined with a `Text` definition.  \n\n### Node header\n\n(we may extends to control over property types if needed or PR proposed)  \n\nCreating a table for a nodetype  \n\n    @ Person:  label ; image \n\nWe just defined a `Person` nodetype with `properties`.\n\n`label` is required and is the property used by padagraph to render in graphs and find nodes in the searchbox.  \n`image` is used by padagraph to render nodes in graph.  \n\nIndexed columns can be specified with an extra '#'.  \n\n    @ Person: #num; label; image ; +roles\n\nyou will next use `num` values  to create `Relations` for shorthand and pad maintenance and uniqness.  \n\nNext row is expecting data from this table.  \nBegining and ending space will be removed in each cell.    \n\n    *0; François Fillon; https://infographics.mediapart.fr/2017/nodes-fillon/img/nodes/0.png; candidat, premier ministre\n    3; Myriam Lévy; https://infographics.mediapart.fr/2017/nodes-fillon/img/nodes/3.png\n    4; Delphine Burgaud; https://infographics.mediapart.fr/2017/nodes-fillon/img/nodes/4.png\n    5; Delphine Peyrat-Stricker; https://infographics.mediapart.fr/2017/nodes-fillon/img/nodes/5.png\n    15; Anne Méaux; https://infographics.mediapart.fr/2017/nodes-fillon/img/nodes/15.png\n\nMind the node 0 , starting with `*` is `starred` .  \n\n\n### Edge header\n\nAs a `nodetype`, an `edgetype` is described by properties.  \n`_` is the marker used to start a set of relation of a certain type.\n\n    _ Knows: \n\nand the data we use the indexed culumn `num` to identify the nodes and create links.\n\n    0 -- 5\n    0 -- 4\n    15 -- 4\n    15 -- 3\n    \n!!!! Warning you have to keep your uniq ids for the whole data !!!!   \n\n### Projection\n\nSometimes you want to use a property of the row as a Node with a link to the row  \nConsidere a list of politicians  \n\n    @ Politic: %Chamber; #FirstName; #LastName; %Party; %State; %Stance; Statement;\n\n    Senator,Lisa,Murkowski,R,AK,Neutral,\"All weekend long my staff and I have been monitoring ...\"\n    Senator,Dan,Sullivan,R,AK,Support,\"Excerpt -  The temporary restrictions, which I support,  ...\"\n\nwe ll get a graph with 7 nodes from 5 types  \n2 'Politics', 1 'Chamber' (Senator), 1 'State' (AK) , 1 'Party' (R) , 2 'Stance' ...  \nand 8 edges.  \n\n    Politic -- Chamber  (2) \n    Politic -- State   (2)\n    Politic -- Party   (2)\n    Politic -- Stance  (2)\n\n### Note :\n\n####   mixing '%' and '+' in a prop will project row on each value of the cell  \n\n     @ Test: #id ; %+ prop ; another\n     1; a, b, c ; another\n     ! this will create 3 links\n     1 -- a\n     1 -- b\n     1 -- c\n     \n#### mixing '%', '+' and '=' :\n\n'=' create a clique of the nodes means create a link between each values  \n\n     @ Test: #id ; %+= prop ; another\n     1; a, b, c ; another\n     ! this will create 3 links like row -- prop\n     1 -- a\n     1 -- b\n     1 -- c\n\nand also 3 links  \n\n     a -- b\n     a -- c\n     b -- c\n \nmaybe it s weird now ?\n        \n### Import\n\nAs the data can be collected from differents tiers,\nthey can also be used in a different dataset. \n\n    ! one set of data describe states ( code, name, image . )\n    \u0026 https://mensuel.framapad.org/p/usstates/export/txt\n    \n    ! one to describe senators\n    \u0026 https://mensuel.framapad.org/p/uspol/export/txt\n\n    ! then add some nodes and links ..\n    @ ...\n    or\n    _ ...\n\n\n## Usage\n\n    # see help :\n    $ python botapad.py --help\n\n    # exemple with framapad\n    # edge graph\n    $ python botapad.py fillon https://mensuel.framapad.org/p/qzpH0qxHkM/export/txt  --key `cat ../../key.txt` --separator ';'\n\n    # projected graph\n    $ python botapad.py uspol https://mensuel.framapad.org/p/uspol/export/txt  --key `cat ../../key.txt` --separator ','\n    \n## Combine\n\n    Combine import and screenshots\n\n    $ python ../bots/botapad.py testcsv https://mensuel.framapad.org/p/qzpH0qxHkM/export/txt --host http://localhost:5000 --key `cat ../../key.local` -v \\\n    \u0026\u0026 python screenshot.py testcsv fin.png  --width 600 --height 600 --zoom 1000 --no-labels --vertex-size 1 --wait 4 --host http://localhost:5000 -d chromedriver \\\n    \u0026\u0026 feh fillon.png\n\n\n# flask app / Botapadapp\n\nAccessible service for botapad  \n\n### Run\n\n#### Install deps\n\n    $ pip install -r requirements.txt\n\n#### Export host\n\n    # routes: external server to compute layouts/clustering given\n    $ export ENGINES_HOST=http://www.padagraph.io\n\n#### copy your token\n\n```get a token``` from (http://padagraph.io/account/me/generate_auth_token)  \n```copy``` to ```secret/key.txt``` \n\n#### Run  \n\n    $ python botapadapp.py\n\n#### Paths\n\n    /\n    /readme\n    /stats\n    /import\n    /import/igraph    form\n    /import/padagraph form\n    /static/*.js css  \n\n\n\n[SCREENSHOT] requires ../../screenshot/screenshot.py in `$PYTHONPATH`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadagraph%2Fbotapadd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpadagraph%2Fbotapadd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadagraph%2Fbotapadd/lists"}