Portál AbcLinuxu, 12. května 2025 05:27
def snippet(ucel): pyperclip.copy(f'\n#{ucel}{snippety[ucel]}\n') print(f'\nsnippet {ucel}:{snippety[ucel]}')Ale tento ne:
pyperclip.copy(celkovy_vytazeny_text)Cely skript prikladam v priloze a zde je cast textu pro zpracovani skriptem (se skriptem samotnym nema co delat, jde o vytazeni plantuml komentaru z nejakeho pythonoveho skriptu):
def visa_category_s_informants_against_criminal_or_terrorist_organizations(x): """s visas for informants against criminal or terrorist organizations""" ys5 = ['informant against criminal organization'] ys6 = ['informant against terrorist organization'] ys7 = ['family member of an s visa holder'] print 's-5',ys5 print 's-6',ys6 print 's-7',ys7 #.# if (Informant Against Criminal Organization) then (yes) if x in ys5: #.# :S-5 Visa; return 's-5' #.# elseif (Informant Against Terrorist Organization) then (yes) elif x in ys6: #.# :S-6 Visa; return 's-6' #.# elseif (family member of S Visa holder) then (yes) elif x in ys7: #.# :S-7 Visa; return 's-7' #.# else (no) else: #.# stop return 'nic' #.# endif def visa_category_tn_and_other_north_american_free_trade_agreement(x): """tn and other visas for north american free trade agreement""" y = ['north american free trade agreement'] print 'tn and other',y #.# if (North American Free Trade Agreement) then (yes) if x in y: #.# :TN and Other Visas; return 'tn and other' #.# else (no) else: #.# stop return 'nic' #.# endifNemeli byste nekdo nejaky napad co s tim? Kdyztak predem diky za pripadne tipy.
zkus dát dopryč ten xsel a mit tam jakoby jenom ten xclip možná :O :O
koukni taky sem možná co tam všecko různýho raděj v komentáři v __init__.py zdrojáčku na githubu hele
mě to jakoby uplně normálně funguje :O :O
debian bullseye/sid taky s kde a pyperclip 1.8.1
noa z těch tří balíčků požadovanejch mam nainstalovanej jenom xclip :O :O
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.