Skip to content

Commit

Permalink
helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
fpelliccioni committed Apr 6, 2019
1 parent 183eb29 commit 3529b21
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions helpers/clone-copy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os
import os.path
from shutil import copyfile


PATH = '/Users/fernando/dev/bitprim/bitprim-consensus/src/clone-abc/'
SOURCE_PATH = '/Users/fernando/dev/bitcoin-abc/src/'

# result = [os.path.join(dp, f) for dp, dn, filenames in os.walk(PATH) for f in filenames if os.path.splitext(f)[1] == '.txt']
# result = [os.path.join(dp, f) for dp, dn, filenames in os.walk(PATH) for f in filenames]
result = [(dp, f) for dp, dn, filenames in os.walk(PATH) for f in filenames]

for dp, f in result:
x = os.path.join(dp, f)

# print(dp)
# print(x)
# print(x[len(PATH):])

source_file = os.path.join(SOURCE_PATH, x[len(PATH):])
print(source_file)
# print(os.path.isfile(source_file))

# print(x)



copyfile(source_file, x)
10 changes: 10 additions & 0 deletions helpers/crlf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import re

with open('conanfile.py', 'r') as content_file:
content = content_file.read()

linend = re.compile(r'\r')
splited = linend.split(content)

print(len(splited))
print(splited)

0 comments on commit 3529b21

Please sign in to comment.