corey01: (Default)
[personal profile] corey01
публикую скриптик (работает в Linux или cygwin) для вычисления жж-ных друзей в dw.

Как пользоваться:

1. Скопировать скрипт в файл (напр. lj2dw.sh)
2. В той же папке завести файлик (напр. users.txt) и копи-паст в него список друзей из жж-профайла.
3. Не забываем chmod +x lj2dw.sh
4. ./lj2dw.sh users.txt
5. voila


#!/bin/bash
if [ -z $1 ]; then
echo "usage: testusers "
echo " users list: text file with dw nicknames, space, tab, or newline delimited"
exit
fi
rm users-found.txt
us=`cat $1`
us=${us//","/" "}
us=( $us )
for ((j=0;j<${#us[*]};j++));do
if grep -q "There is no user" <<< `curl ${us[j]}.dreamwidth.org`; then
echo "No user ${us[j]} found"
else
echo "FOUND USER ${us[j]}!!!!!!"
echo ${us[j]}>>users-found.txt
fi
done
echo "*************"
echo "Found users:"
cat users-found.txt

Date: 2011-12-01 11:28 pm (UTC)
From: [identity profile] aleatorius.livejournal.com
работает скриптик
очень мало там народа перебралось

Date: 2011-12-02 01:12 am (UTC)
From: [identity profile] corey01.livejournal.com
у меня процентов 10

Profile

corey01: (Default)
corey01

September 2017

S M T W T F S
     12
3456789
1011121314 1516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2025 10:08 am
Powered by Dreamwidth Studios