brrd / lodapi Goto Github PK
View Code? Open in Web Editor NEWNode.js remote API for Lodel
License: MIT License
Node.js remote API for Lodel
License: MIT License
Use https://github.com/GoogleChrome/puppeteer (or a similar library) instead of cheerio in order to avoid potential data loss when submitting the full article.
Support concurrency out of the box with a concurrency
option.
Instantiate a p-limit in LodelSession constructor and store it as a property + use it in methods.
Long URL like:
lodel/admin/index.php?do=massassoc&lo=entries&edit=1&associate=1&identities[0]=5992&identities[1]=3727&identities[2]=4975&identities[3]=5618&identities[4]=2225&identities[5]=5835&identities[6]=4158&identities[7]=6163&identities[8]=4124&identities[9]=4103&identities[10]=5301&identities[11]=6190&identities[12]=4111&identities[13]=2405&identities[14]=4329&identities[15]=6000&identities[16]=4295&identities[17]=3452&identities[18]=5567&identities[19]=4107&identities[20]=4109&identries[0]=7637_6263
returns an error 500 with this message:
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 10
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 11
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 12
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 13
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 14
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 15
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 16
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 17
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 18
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 19
PHP Error (Notice) in file '/var/www/dev/lodel/lodel/scripts/context.php' on line 202 :
Uninitialized string offset: 20
Looks like Lodel massassoc doesn't work well with more than 10 entities to move.
Possible workaround: split this in multiple requests.
...and don't forget to build Typescript.
Lorsque le site est bloqué, lodapi échoue sur un timeout:
code: 'ESOCKETTIMEDOUT',
connect: false,
level: 'error',
timestamp: '2023-02-19T11:03:46.624Z',
[Symbol(level)]: 'error',
[Symbol(message)]: '2023-02-19T11:03:46.624Z error: ESOCKETTIMEDOUT'
Il faudrait parser la page de réponse du formulaire et logger le message d'échec d'authentification.
This method used to upload all docs in a directory to a publication.
See decaffeinated 0.0.x: https://github.com/brrd/lodapi/blob/decaffeinate/src/upload-all.js
data
n'est pas identique partout. Certaines méthodes utilisent la forme field: value
, d'autres la forme data[field]: value
.Exemple (deux en un) :
await session.createPublication({ idParent: 0, idType: 12, data: { "titre": "Foo bar" } });
await session.editIndex(123, "entries", { "data[definition]": "Foo bar" });
Add editEntity() method based on createEntity()
Lodapi uses its own queue since 6037192
Déplace la méthode d'import des images d'accroche depuis emfixer vers lodapi.
Method checkLodelAdmin() always returns false when lodeladmin/index.php does not exist (in prod, by instance).
Write this in a separate project (lodapi-cli).
See https://github.com/brrd/lodapi/blob/decaffeinate/src/cli.js
(Adding the ability to browse publications using ls
and cd
would rocks)
Move to a browser-compatible request library (such as https://github.com/axios/axios) in order to support execution in browser.
List of alternative to request: request/request#3143
The workaround (= resubmitting an entity to remove its related duplicate persons) does not seam to work anymore.
This needs further investigation.
Example: site/lodel/edition/index.php?do=move&id=74&idparent=3698
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.