Skip to content

Instantly share code, notes, and snippets.

@pogin503
Last active August 29, 2015 14:06
Show Gist options
  • Save pogin503/0a45bfb936deaee7d477 to your computer and use it in GitHub Desktop.
Save pogin503/0a45bfb936deaee7d477 to your computer and use it in GitHub Desktop.
init.elの行数カウントのスクリプトとか
git clone https://github.com/nanasess/dot.emacs nanasess-dotmacs
git clone https://github.com/syohex/dot_files/tree/master/emacs/ syohex-dotmacs
git clone https://github.com/eiel/.emacs.d eiel-dotmacs
git clone https://github.com/byplayer/dot.emacs.d byplayer-dotmacs
git clone https://github.com/muratayusuke/dot.emacs.d muratayusuke-dotmacs
git clone https://github.com/shibayu36/emacs shibayu-dotmacs
git clone https://github.com/tarao/dotfiles/tree/master/.emacs.d tarao-dotmacs
git clone https://github.com/gongo/elfactory gongo-dotmacs
git clone https://github.com/shishi/.emacs.d shishi-dotmacs
git clone https://github.com/takaxp/emacs.d/blob/master/init.el takaxp-dotmacs
git clone https://bitbucket.org/sakito/dot.emacs.d/ sakito-dotmacs
git clone https://github.com/ogatomo/emacs ogatomo-dotmacs
git clone https://github.com/uwabami/dot.emacs.d uwabami-dotmacs
git clone https://github.com/pogin503/dot-emacs pogin-dotmacs
git clone https://github.com/handlename/dot-emacs handlename-dotmacs
git clone https://github.com/murasesyuka/dotemacs murasesyuka-dotmacs
git clone https://github.com/yewton/dot-emacs yewton-dotmacs
git clone https://github.com/posaunehm/.emacs.d posaunehm-dotmacs
git clone https://github.com/niku/.emacs.d niku-dotmacs
git clone https://github.com/zk-phi/dotfiles/blob/master/emacs/init.el zk-dotmacs
git clone https://gist.github.com/masutaka/8177244 masutaka-dotmacs
git clone https://github.com/yoshitia/.emacs.d/blob/master/init.el yoshitia-dotmacs
git clone https://github.com/sugyan/dotfiles sugyan-dotmacs
git clone https://github.com/supermomonga/dot-emacs supermomonga-dotmacs
git clone https://github.com/fjyuu/dotfiles/tree/master/share/dot.emacs.d fjyuu-dotmacs
str = %w(https://github.com/nanasess/dot.emacs
https://github.com/syohex/dot_files/tree/master/emacs/
https://github.com/eiel/.emacs.d
https://github.com/byplayer/dot.emacs.d
https://github.com/muratayusuke/dot.emacs.d
https://github.com/shibayu36/emacs
https://github.com/tarao/dotfiles/tree/master/.emacs.d
https://github.com/gongo/elfactory
https://github.com/shishi/.emacs.d
https://github.com/takaxp/emacs.d/blob/master/init.el
https://bitbucket.org/sakito/dot.emacs.d/
https://github.com/ogatomo/emacs
https://github.com/uwabami/dot.emacs.d
https://github.com/pogin503/dot-emacs
https://github.com/handlename/dot-emacs
https://github.com/murasesyuka/dotemacs
https://github.com/yewton/dot-emacs
https://github.com/posaunehm/.emacs.d
https://github.com/niku/.emacs.d
https://github.com/zk-phi/dotfiles/blob/master/emacs/init.el
https://gist.github.com/masutaka/8177244
https://github.com/yoshitia/.emacs.d/blob/master/init.el
https://github.com/sugyan/dotfiles
https://github.com/supermomonga/dot-emacs
https://github.com/fjyuu/dotfiles/tree/master/share/dot.emacs.d
)
# FIXME: 要修正
# ~~/user/repo/tree/master とか
# ~~/blob/masterのときにエラーになる
str.map do |s|
x1 = s.sub(%r{(https://github.com/|https://gist.github.com/|https://bitbucket.org/)}, '')
uname = %r{([a-z])+}.match(x1)
unless x1[1].nil?
puts "git clone #{s} #{uname}-dotemacs"
end
end
# ↓手で修正
# git clone https://github.com/nanasess/dot.emacs nanasess-dotmacs
# git clone https://github.com/syohex/dot_files syohex-dotmacs
# git clone https://github.com/eiel/.emacs.d eiel-dotmacs
# git clone https://github.com/byplayer/dot.emacs.d byplayer-dotmacs
# git clone https://github.com/muratayusuke/dot.emacs.d muratayusuke-dotmacs
# git clone https://github.com/shibayu36/emacs shibayu-dotmacs
# git clone https://github.com/tarao/dotfiles/tree/master/.emacs.d tarao-dotmacs
# git clone https://github.com/gongo/elfactory gongo-dotmacs
# git clone https://github.com/shishi/.emacs.d shishi-dotmacs
# git clone https://github.com/takaxp takaxp-dotmacs
# git clone https://bitbucket.org/sakito/dot.emacs.d/ sakito-dotmacs
# git clone https://github.com/ogatomo/emacs ogatomo-dotmacs
# git clone https://github.com/uwabami/dot.emacs.d uwabami-dotmacs
# git clone https://github.com/pogin503/dot-emacs pogin-dotmacs
# git clone https://github.com/handlename/dot-emacs handlename-dotmacs
# git clone https://github.com/murasesyuka/dotemacs murasesyuka-dotmacs
# git clone https://github.com/yewton/dot-emacs yewton-dotmacs
# git clone https://github.com/posaunehm/.emacs.d posaunehm-dotmacs
# git clone https://github.com/niku/.emacs.d niku-dotmacs
# git clone https://github.com/zk-phi/dotfiles zk-dotmacs
# git clone https://gist.github.com/masutaka/8177244 masutaka-dotmacs
# git clone https://github.com/yoshitia/.emacs.d yoshitia-dotmacs
# git clone https://github.com/sugyan/dotfiles sugyan-dotmacs
# git clone https://github.com/supermomonga/dot-emacs supermomonga-dotmacs
# git clone https://github.com/fjyuu/dotfiles fjyuu-dotmacs
require 'open-uri'
require 'nokogiri'
doc = Nokogiri::HTML(open('http://emacs-jp.github.io/2014/09/03/dot-emacs-list/'))
doc.xpath('//p/a').each do |node|
puts node['href']
end
# https://github.com/nanasess/dot.emacs
# https://github.com/syohex/dot_files/tree/master/emacs/
# https://github.com/eiel/.emacs.d
# https://github.com/byplayer/dot.emacs.d
# https://github.com/muratayusuke/dot.emacs.d
# https://github.com/shibayu36/emacs
# https://github.com/tarao/dotfiles/tree/master/.emacs.d
# https://github.com/gongo/elfactory
# https://github.com/shishi/.emacs.d
# https://github.com/takaxp/emacs.d/blob/master/init.el
# https://bitbucket.org/sakito/dot.emacs.d/
# https://github.com/ogatomo/emacs
# https://github.com/uwabami/dot.emacs.d
# https://github.com/pogin503/dot-emacs
# https://github.com/handlename/dot-emacs
# https://github.com/murasesyuka/dotemacs
# https://github.com/yewton/dot-emacs
# https://github.com/posaunehm/.emacs.d
# https://github.com/niku/.emacs.d
# https://github.com/zk-phi/dotfiles/blob/master/emacs/init.el
# https://gist.github.com/masutaka/8177244
# https://github.com/yoshitia/.emacs.d/blob/master/init.el
# https://github.com/sugyan/dotfiles
# https://github.com/supermomonga/dot-emacs
# https://github.com/fjyuu/dotfiles/tree/master/share/dot.emacs.d
#!/bin/bash
cd username-dotemacs
# カレントディレクトリの行数のカウント
ls *.el | xargs wc -l
# elファイルの行数カウント
find config -name "*.el" -type f | xargs wc -l && wc -l init.el
# orgファイルの行数カウント
find config -name "*.org" -type f | xargs wc -l
# total行だけ出力する
find dot-emacs-d -name "*.el" -type f | xargs wc -l | grep total && wc -l dot-emacs.el
#=> 724 total
# 276 dot-emacs.el
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment