?

Log in

No account? Create an account
xmlrpc: lineendings? - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

xmlrpc: lineendings? [Feb. 17th, 2005|01:55 pm]
LiveJournal Client Discussions

lj_clients

[bormotov]
I try to acces self journal via xmlrpc from python script.

read:
...
lineendings(required):
[scalar](required) Specifies the type of line-endings you're using. Possible values are unix (0x0A (\n)), pc (0x0D0A (\r\n)), or mac (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.


my primary platform - win32. In data, returned from getevents, I see 0d, 0d, 0a sequences.

Small script can be used with your login:password on your journal, with multiline event on top.
Get lastn three times? with other lineendings value - result equal.

Maybe I misunderstand something?
linkReply

Comments:
[User Picture]From: hythloday
2005-02-17 02:40 pm (UTC)
The documentation should probably read something like:

Possible values are 'unix' (\n), 'pc' (\r\n), or 'mac' (\r).

In other words, don't pass the line-ending, pass the string, 'pc'.
(Reply) (Thread)
[User Picture]From: bormotov
2005-02-17 02:48 pm (UTC)

nice try!

same script.
I just modify "magick values"
1. 'pc', 'mac', 'unix'
[skip]
get last even with others 'lineendings' value:
lineendings = pc
lineendings = mac
lineendings = unix
compare:
PC == MAC
PC == Unix
MAC == Unix
done.

2. '\r\n', '\r', '\n'
[skip]
get last even with others 'lineendings' value:
lineendings =

lineendings =
lineendings =

compare:
PC == MAC
PC == Unix
MAC == Unix
done.


ok-ok-ok. I am dumb.
Any another versions of correct values for 'lineendings' paramter?
(Reply) (Parent) (Thread)